class Solution {
    public boolean isPalindrome(String s) {
        String arn = "";
        s = s.toLowerCase();
        for (int i = 0; i < s.length(); i++) {
            int ss = s.charAt(i);
            if((ss >= 48 && ss <= 57) || (ss >= 97 && ss <= 122)) {
                arn += s.charAt(i);
            }
        }
        int left = 0;
        int rigth = arn.length() - 1;
        while(left < rigth) {
            if(arn.charAt(left) == arn.charAt(rigth)) {
                left++;
                rigth--;
            } else {
                return false;
            }
        }
        return true;
    }
}